<div id="listing">
	<h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
		<span class="ui-icon ui-icon-triangle-1-s"></span>
		Recent Activities
	</h3>
	<div class="slide_content">
		<div class="ra_pagination"></div>
		<div id="ra_div"></div>
	</div>
	<h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
		<span class="ui-icon ui-icon-triangle-1-e"></span>
		Recent Sales
	</h3>
	<div class="slide_content" style="display:none;">
		<div class="rs_pagination"></div>
		<div id="rs_div"></div>
	</div>
	<h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
		<span class="ui-icon ui-icon-triangle-1-e"></span>
		Report
	</h3>
	<div class="slide_content" style="display:none">
		<div class="chart_options">
			<div class="period_drop-down">
		    	Period: <?= form_dropdown('period', $period, false,'id="period"');?>
		    </div>
		    <div class="period_choices">
		    	<input type="hidden" id="general_date" value="<?=date('Y-m-d')?>" />
		    	<span class="display-none" id="day">
		    		Date: <input type="text" value='<?=date('Y-m-d')?>' class="day_value" readonly="true" size="10"/>
		    	</span>
		        <span class="display-none" id="week">
		            Date: <input type="text" value="<?=date('Y-m-d')?>" class="week_value" size="10" readonly="true"/>
		            Range: <input type="text" value="<?=date('Y-m-d', strtotime($date['sunday']))?>" class="week_start_value" size="10" readonly="true"/>
		            to <input type="text" value="<?=date('Y-m-d', strtotime($date['saturday']))?>" class="week_end_value" size="10" readonly="true"/>
		        </span>
		        <span class="display-none" id="month">
		            Month: <?=form_dropdown('period_month', $this->utils->months, date('m', strtotime('first day of this month')), 'class="month_value"')?>
		            Year: <?=form_dropdown('period_year', $this->utils->years(), date('Y', strtotime('first day of this month')), 'class="month_year_value"')?>
		        </span>
		    </div><br/>
		    <span class="prev_button">Prev</span>
		    <span class="update_graph">Refresh</span>
		    <span class="next_button">Next</span>
		</div>
		<div id="report_div"></div>
		<div id="additional_buttons">
			<?=anchor('admin/send_email_report/','<img src="html/img/mail.png" height="25px" width="25px" />','id="send_email"')?>
			<?=anchor('#','<img src="html/img/printer.png" height="18px" width="20px" />','id="print"')?>
			<img src="html/img/ajax-loader.gif" class="loader" style="display:none"/>
		</div>
	</div>
</div>

<script>
/* ra init var */
var ra_num_entries = <?=$activities->num_rows()?>;
var ra_num_edge_entries = <?=$this->activities_model->num_edge_entries?>;
var ra_items_per_page = <?=$this->activities_model->items_per_page?>;

var rs_num_entries = <?=$sales->num_rows()?>;
var rs_num_edge_entries = <?=$this->sales_model->num_edge_entries?>;
var rs_items_per_page = <?=$this->sales_model->items_per_page?>;

$(function(){
	ra_pagination_init();
	rs_pagination_init()
//	silder
	$('#listing h3').livequery('click', function() {
		if($(this).children('span').attr('class') == 'ui-icon ui-icon-triangle-1-s')
		{
			$(this).next().slideUp();
			$(this).children('span').removeClass('ui-icon-triangle-1-s');
			$(this).children('span').addClass('ui-icon-triangle-1-e');
		}
		else
		{
			$(this).next().slideDown();
			$(this).children('span').removeClass('ui-icon-triangle-1-e');
			$(this).children('span').addClass('ui-icon-triangle-1-s');
		}
	});

	$('#print').click(function(e) {
		e.preventDefault();
		$('#report_div').jqprint();
	});
});
</script>

<script src="html/js/page_charting.js" type="text/javascript"></script>
<script src="html/js/page_dashboard.js" type="text/javascript"></script>